Hosted by InnoQ in Düsseldorf, 27th June 2014
TiddlyWiki was first released 10 years ago (before jQuery!).
TiddlyWiki5 began in 2011, and is currently in beta: https://github.com/Jermolene/TiddlyWiki5
TiddlyWiki is a JavaScript wiki that can run entirely in the browser, or under Node.js.
The awkward but HTML5-compliant way:
var link = document.createElement("a");
link.setAttribute("target","_blank");
link.setAttribute("href","data:text/html," + encodeURIComponent(text));
link.setAttribute("download",filename);
document.body.appendChild(link);
link.click();
document.body.removeChild(link);Allows changes to be saved directly to the file system in Firefox (including Firefox for Android).
TiddlyDesktop is a custom browser with extensions to support working with TiddlyWiki. Based on node-webkit.
You're already in a demo of TiddlyWiki, but here's a quick run through of using it:
<$list filter="[!has[draft.of]tag[task]!tag[done]sort[created]]">
<$checkbox tag="done"> <$link to={{!!title}}><$view field="title"/></$link></$checkbox>
</$list>Demo of customising TiddlyWiki:
Individual freedom on the Internet is threatened by the behaviour of corporations and the Governments that subvert them.
Why that matters - all the single file decentralisation stuff
How can we make an independent web? It's fundamentally asymmetrical; only brave homesteaders run their own servers, most people are happy to rent space from a central service. The jump to running your own server is huge: it's a new cost for most people, and the benefit is intangible. It's one of those situations where the penalties for screwing up can be disproportionate: eg, failing to keep backups or to keep security software up to date.
Browser-based web apps are cool, but the locus of control is wrong. The site decides when to update the app; the site decides whether or not the app is available at any particular time. The user can't save a webapp so that they can check it later, or take a snapshot of their data so that they can roll back to it if they don't like a later update.
A tiddler is defined as the smallest semantic unit of information.
It is a structure optimised for reuse through aggregation and composition.
Wikification is the process of converting WikiText into HTML.
It makes linking (and other hypertext operations) become part of the punctuation of writing.
It's tiddlers, all the way down. The tiddler model is used for:
The boot kernel brings up enough of the infrastructure to load plugins. The core code itself is a plugin.
TiddlyWiki is just an engine: one of the applications you can write with it is the TW UI, but also easy to build completely different UIs.
Like Angular and Ractive. Not string based; always uses a DOM and selective updating.
Show how sidebar state is held in $:/state/sidebar:
$tw.wiki.addTiddler(new $tw.Tiddler({title: "$:/state/sidebar",text: "yes"}))Basic primitives for user interfaces:
<$transclude> widget to transclude another tiddler<$reveal> widget to selectively show or hide content according to a state tiddler<$button> widget set or toggle a state tiddler<$list> widget to repeat a template for each of several tiddlerstiddlywiki mywiki --init tw5.com
tiddlywiki mywiki --rendertiddler $:/core/save/all index.html text/plainSee the template for the HTML, and for some of the CSS.
tiddlywiki my2wiki --init server
tiddlywiki my2wiki --serverTiddlyWiki5 provides a TiddlyWeb-compatible API
PouchDB - from Jon Udell's Thali project - https://gist.github.com/judell/9744381
The same syncer module is used in the browser and the server.
/*
A sample node.js application that uses TiddlyWiki5 as a library
*/
var $tw = {};
require("../TiddlyWiki5/boot/bootprefix.js").bootprefix($tw)
// Dummy command line arguments telling TW5 not to load a wiki from the filesystem
$tw.boot = $tw.boot || {};
$tw.boot.argv = ["*"];
require("../TiddlyWiki5/boot/boot.js").TiddlyWiki($tw);
// Boot TiddlyWiki
$tw.boot.boot();
// Add some tiddlers
$tw.wiki.addTiddler({
title: "TiddlerOne",
text: "Text of tiddler one, incorporating the {{TiddlerTwo}}",
tags: ["alpha", "beta"]
});
$tw.wiki.addTiddler({
title: "TiddlerTwo",
text: "Text of tiddler two"
});
// Render a tiddler as HTML
var html = $tw.wiki.renderTiddler("text/html","TiddlerOne");
console.log(html);
I've learned:
Several other projects share goals with TiddlyWiki: